using System;
using ns27;

namespace Triton.Game.Mapping
{
	[Attribute38("GameObject")]
	public class GameObject : UnityObject
	{
		public bool ActiveSelf => method_11<bool>("get_activeSelf", Array.Empty<object>());

		public bool Active => method_11<bool>("get_active", Array.Empty<object>());

		public bool ActiveInHierarchy => method_11<bool>("get_activeInHierarchy", Array.Empty<object>());

		public Transform Transform => method_14<Transform>("get_transform", Array.Empty<object>());

		public Renderer Renderer
		{
			get
			{
				Component component = GetComponent<Renderer>();
				if (component == null)
				{
					return null;
				}
				return new Renderer(component.Address);
			}
		}

		public GameObject(IntPtr address)
			: base(address, "GameObject")
		{
		}

		public Component GetComponent(string type)
		{
			return method_15<Component>("GetComponent", new Class276.Enum20[1] { Class276.Enum20.String }, new object[1] { type });
		}

		public Component GetComponent<T>() where T : Component
		{
			return GetComponent(typeof(T).Name);
		}
	}
}
